{include(head.tpl)}
<body>
<div class="wrapper-content">
    <div class="animated fadeInDown wrap">
        <form id="frm" action="{modelurl}/Uploads/upload_face" target="f" method="post" enctype="multipart/form-data">
            <table class="table3">
                <tr>
                    <th>登陆名:</th>
                    <td><input type="text" disabled name="loginname" value="{list.loginname}"></td>
                </tr>
                <tr>
                    <th>用户名:</th>
                    <td><input type="text" name="name" value="{list.name}"></td>
                </tr>
                <tr>
                    <th>角色:</th>
                    <td>
                        <select name="roleid">
                            {foreach from=roleList item=vo}
                                <option {if $vo['id']==$this->vars['list']['roleid']}selected{/if} value="{$vo.id}">{$vo.rolename}</option>
                            {/foreach}
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>密码:</th>
                    <td><input type="password" name="pwd" value=""><label>如果为空则不更改密码</label></td>
                </tr>
                <tr>
                    <th>头像:</th>
                    <td>
                        <img style="height:48px; width: 100px" class="faceimg" src="{list.face}">
                        <input type="hidden" class="face" name="face" value="{list.face}">
                        <input name="faceUpload" class="face_click" type="file" value="">
                        <iframe name="f" style="display:none;"></iframe>
                        <script>
                            $(function(){
                                $('.face_click').change(function(){
                                    $('#frm').submit();
                                })
                            })
                            //上传压缩文件
                            function upfile(data){
                                if(data.status){
                                    $('.faceimg').attr('src',data.img);
                                    $('.face').val(data.img);
                                }else{
                                    layer.msg(data.msg);
                                }
                            }
                        </script>
                    </td>
                </tr>
                <tr>
                    <th>手机号:</th>
                    <td><input type="text" name="mobile" value="{list.mobile}"></td>
                </tr>
                <tr>
                    <th>联系电话:</th>
                    <td><input type="text" name="telphone" value="{list.telphone}"></td>
                </tr>
                <tr>
                    <th>邮箱:</th>
                    <td><input type="text" name="mail" value="{list.mail}"></td>
                </tr>
                <tr>
                    <th>登录令牌:</th>
                    <td><input type="text" name="token" value="{list.token}"></td>
                </tr>
                <tr>
                    <th>pgc手机唯一标识:</th>
                    <td><input type="text" name="pgctoken" value="{list.pgctoken}"></td>
                </tr>
                <tr>
                    <th>状态:</th>
                    <td>
                        <input type="radio" name="status" {if $this->vars['list']['status']==1}checked{/if} value="1">正常
                        <input type="radio" name="status" {if $this->vars['list']['status']==0}checked{/if} value="0">禁止中
                    </td>
                </tr>
                <tr>
                    <th>账号是否被锁定:</th>
                    <td><input type="radio" name="locked" {if $this->vars['list']['locked']==1}checked{/if} value="1">正常<input type="radio" name="locked" {if $this->vars['list']['locked']==0}checked{/if} value="0">禁止中</td>
                </tr>
                <tr>
                    <th>锁定时间:</th>
                    <td><input type="text" name="locktime" disabled value="<?php echo date('Y-m-d H:i:s', $this->vars['list']['locktime']) ?>"></td>
                </tr>
                <tr>
                    <th>锁定原因:</th>
                    <td><input type="text" name="lockreason" disabled value="{list.lockreason}"></td>
                </tr>
                <tr>
                    <th>注册时间:</th>
                    <td><input type="text" name="regtime" disabled value="<?php echo date('Y-m-d H:i:s', $this->vars['list']['regtime']) ?>"></td>
                </tr>
                <tr>
                    <th>最后登录时间:</th>
                    <td><input type="text" name="lastlogintime" disabled value="<?php echo date('Y-m-d H:i:s', $this->vars['list']['lastlogintime']) ?>"></td>
                </tr>
                <tr>
                    <th>最后退出时间:</th>
                    <td><input type="text" name="lastloginout" disabled value="<?php echo date('Y-m-d H:i:s', $this->vars['list']['lastloginout']) ?>"></td>
                </tr>
                <tr>
                    <th></th>
                    <td>
                        <input type="hidden" name="id" value="{list.id}">
                        <input type="button" class="h_sub submit" value="提交">
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>

<script>
    $(function(){
        $('.h_sub').click(function(){
          var arr=_ajaxs.from('#frm');
          _ajaxs.post('{mothedurl}','arr='+arr,function _return(hdata){
              if(hdata.status){
                  layer.msg(hdata.msg,function(){
                      window.parent.layer_return();
                  });
              }else{
                layer.msg(hdata.msg);
              }
          })
        })
    })
</script>
</body>
</html>
